/*
 * Kinect Player
 * Kulikov Victor
 * kulikov.victor@gmail.com
 * GNU Lisence 2011
 */
#ifndef DUBSLIDER_H
#define DUBSLIDER_H

#include <QSlider>

class DubSlider : public QSlider
{
Q_OBJECT
public:
    explicit DubSlider(QWidget *parent = 0);

    void paintEvent(QPaintEvent *event);

    void setHighlightColor(QColor color);
    int leftFlag();
    int rightFlag();
signals:
    //This signal is send when slider reach the end of fragment if flag isProcess is true
    void fragmentEndReached(int value);
public slots:
    //Set the left and the right flags
    //If f=-1 (by default) the current value of slider will be used
    void setLeftFlag(int f=-1);
    void setRightFlag(int f=-1);
    void setProcess(bool process);
    void cleanFlags();
protected:
    int leftflag;
    int rightflag;
    bool showflag;
    bool isProcess;
    QColor highcolor;
};

#endif // DUBSLIDER_H
